<!DOCTYPE html>
<html lang="en">

<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>

<body>
	<div id="idname">
		<label for="1">1</label>
		<input type="checkbox" id='1' name='x'>
		<label for="2">2</label>
		<input type="checkbox" id='2' name='x'>
		<label for="3">3</label>
		<input type="checkbox" id='3' name='x'>
	</div>

	<script src="http://lib.sinaapp.com/js/jquery/1.9.1/jquery-1.9.1.min.js"></script>
	<script>
		function product(arr) {
			return arr.reduce(function(x, y) {
				return x * y;
			})
		}
		
		function normalize(arr) {
			return arr.map(function(x){
				x = x.toLowerCase();
				x = x.charAt(0).toUpperCase() + x.substring(1);
				return x;
			})
		}
		
		// 定义数字0:
		var zero = function (f) {
			return function (x) {
				return x;
			}
		};
		// 定义数字1:
		var one = function (f) {
			return function (x) {
				return f(x);
			}
		};

		//自增ID
		function nextId(){	
			var a = 0;	
			return function(){
				console.log('stat:' + a);
				return a++;;
			}
		}

		var b = nextId();
		for(var i = 0; i < 5; i++){
			b();
		}
	</script>
</body>

</html>